/**
 * @Author: Sagan
 * @Date: 2020/09/27 11:05
 */
package constant

var RULE = []string{
	REQUIRE, INT, FLOAT, BOOLEAN, BOOLEAN_TRUE, BOOLEAN_FALSE, ARRAY, EMAIL,
	ALPHA, ALPHA_NUM, ALPHA_DASH, CHS, CHS_NUM, CHS_ALPHA, CHS_ALPHA_NUM, CHS_DASH,
	IP, IPV4, IPV6, JSON,
	IN, NOT_IN, BETWEEN, NOT_BETWEEN,
	LENGTH, MAX, MIN,
	EQ, EQ_alias, NEQ, NEQ_alias, GT, GT_alias, GTE, GTE_alias, LT, LT_alias, LTE, LTE_alias,
}

// 格式验证类
const (
	REQUIRE       = "require"
	REQUIRE_ZERO   = "require:zero"
	INT           = "int"
	FLOAT         = "float"
	BOOLEAN       = "boolean"
	BOOLEAN_TRUE  = "boolean:true"
	BOOLEAN_FALSE = "boolean:false"
	ARRAY         = "array"
	EMAIL         = "email"
	ALPHA         = "alpha"
	ALPHA_NUM     = "alphaNum"
	ALPHA_DASH    = "alphaDash"
	CHS           = "chs"
	CHS_NUM       = "chsNum"
	CHS_ALPHA     = "chsAlpha"
	CHS_ALPHA_NUM = "chsAlphaNum"
	CHS_DASH      = "chsDash"
	IP            = "ip"
	IPV4          = "ipv4"
	IPV6          = "ipv6"
	JSON          = "json"
	JSON_ARRAY    = "json:array"
	JSON_OBJECT   = "json:object"
)

// 区间验证类
const (
	IN          = "in"
	NOT_IN      = "notIn"
	BETWEEN     = "between"
	NOT_BETWEEN = "notBetween"
)

// 长度验证类
const (
	LENGTH = "length"
	MAX    = "max"
	MIN    = "min"
)

// 字段比较类
const (
	EQ        = "eq"
	EQ_alias  = "="
	NEQ       = "neq"
	NEQ_alias = "!="
	GT        = "gt"
	GT_alias  = ">"
	GTE       = "gte"
	GTE_alias = ">="
	LT        = "lt"
	LT_alias  = "<"
	LTE       = "lte"
	LTE_alias = "<="
)
